// Copyright 2009 Jan Hosang <jan.hosang@gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
    "gomake"
    "flag"
)

var help *bool = flag.Bool("h", false, "display this usage")
var src *string = flag.String("src", "src/", "where the source files are located")
var obj *string = flag.String("obj", "_obj/", "where the object files will be put")
var pkg *string = flag.String("pkg", "pkg/", "where the package archive files will be put")
var target *string = flag.String("o", "", "how the target binary will be named")
var scan *bool = flag.Bool("scan", false, "only output the detected build targets, do nothing else")

func main() {
    flag.Parse()
    
    if *help {
        flag.Usage()
        return
    }
    
    gomake.Make(*src, *obj, *pkg, *target, *scan, flag.Args())
}
